function greetOptional(name: string, age?: number): string {
    return age !== undefined
        ? `Hello, ${name}. You are ${age} years old`
        : `Hello ${name}`;
}

function greetDefault(name: string, age: number = 25): string {
    return `Hello, ${name}. You are ${age} years old!`
}

console.log(greetOptional("alen", 444));
console.log(greetOptional("Charlie"));
console.log(greetDefault("NewSpace"));
console.log(greetDefault("Tim lin",899));